package pw.goyd.db.mapping;

import pw.goyd.game.model.Player;

import java.util.List;

/**
 * 玩家信息
 *
 * @author StanWind
 *         账号代理方式
 */
public interface PlayerMapper {
    /**
     * getPlayerByAccount_id
     *
     * @param account_id UUID
     * @return
     */
    Player getPlayer(String account_id);

    /**
     * Player
     *
     * @param p
     */
    void updatePlayer(Player p);

    /**
     * updateDiamond
     *
     * @param p
     */
    void updateDiamond(Player p);

    /**
     * Insert a player
     *
     * @param p
     */
    void insertPlayer(Player p);

    /**
     * 用于查看是否重名
     *
     * @param nickname
     * @return
     */
    int getPlayerCountByNickname(String nickname);

    /**
     * 拿到前五金币的玩家
     *
     * @return
     */
    List<Player> getTopGoldPlayer();

    /**
     * 更改广告激励信息
     *
     * @param player
     */
    void updateAD(Player player);

    /**
     * 更改抽奖信息
     *
     * @param player
     */
    void updateLucky(Player player);
}
